package com.sign.common.annotation;

/**
 * @Author 513422479@qq.com
 * Date on 2021/4/16  16:17
 */
public enum RepeatableTypeEnum {
    IP("IP","ip为标准判断重复提交"),
    TOKEN("TOKEN","token为标准判断重复提交");

    private String code;
    private String value;

    RepeatableTypeEnum(String code, String value) {
        this.code = code;
        this.value = value;
    }

    public String getCode() {
        return code;
    }

    public String getValue() {
        return value;
    }

    public static  RepeatableTypeEnum getObj(String code){
        RepeatableTypeEnum[] values=  RepeatableTypeEnum.values();

        for (RepeatableTypeEnum type: values){
            if(type.code.equals(code)){
                return type;

            }
        }
        return  null;
    }
}
